<?php /* @var $this Controller */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>

        <script>
            var baseUrl = "<?php print Yii::app()->baseUrl . '/index.php/'; ?>";
            var baseUrlClean = "<?php echo Yii::app()->baseUrl; ?>";
        </script>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />

        <!-- blueprint CSS framework -->
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/screen.css" media="screen, projection" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/print.css" media="print" />
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/menu.css"/>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/menu_1.css"/>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/main.css"/>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->request->baseUrl; ?>/css/form.css" />

        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
        <?php // Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/main.js'); ?>
        <?php // Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/funciones.js'); ?>
         <?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/funciones.js'); ?>
        <?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/jquery.mask.min.js'); ?>
        
        <?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/menu.js'); ?>
        <?php Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/diasCalendario.js');?>
       
           

        <?php //Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/jquery-1.11.0.min.js'); ?>
    </head>

    <body>
        <div class="navbar navbar-fixed-top" >
            <div class="navbar-inner">
                <div class="container-fluid" id="navPrincipal">
                    <div class="row-fluid">
                        <div class="span12">
                        <div class="span2">
                    <div class="logo">
                        <p class="navbar-text pull-left" ><?php echo CHtml::image(Yii::app()->baseUrl . "/images/logo4.png") ?></p>
                    </div>
                        </div>

                        <div class="span9 offset1">
                        <div id="menuHorizontal"  >
                        <ul>
                            <li><a href="<?php echo Yii::app()->request->baseUrl;  ?>/index.php/eventos/evento/index" ><span><?php echo CHtml::image(Yii::app()->baseUrl . "/images/iconos/home.png") ?></span></a></li>
                            <li><a href="#" target=""><span>Quienes Somos?</span></a></li>
                            <li><a href='#'><span>Contactanos</span></a></li>
                        </ul>
                    </div>
<!--                            <div class="span1">
                                
                                
                            </div>-->
                            
                             <div class="span4 ">
                               
                                 <div id="escuela" class="active">
                                     <!--<strong>-->
                                         <?php 
                                         Yii::app()->params['abc'] = 123;
//                                       echo 'HOLA';
//                                       echo (Yii::app()->user);
                                            $usuario = Yii::app()->user->um->loadUserById(Yii::app()->user->id);
                                            if(isset($usuario->carrera)){
                                            echo ($usuario->carrera->nombre);}
//                                       var_dump(Yii::app()->user->getField('escuela'));
                                         ?>
                                     <!--</strong>-->
                                    </div>
                             
                            </div>
                           
                         

                          
                       
                       
                      

                    <div class="btn-group nav pull-right "> 
                        <a class="btn btn-success" <?php echo CHtml::link('<i class="icon-off"></i>&nbsp;&nbsp;Cerrar Sesiòn', Yii::app()->user->ui->logoutUrl) ?></a>                   
                    </div>
                    </div>
                    </div>
                    
                       
                </div>

                </div>
            </div>
        </div>

       

        <div class="container-fluid" >
            <div class="row-fluid">
                <div class="span3" id="cssmenu">


                    <ul class="nav nav-list">
                        <li <?php echo!(Util::checkAccess(array('action_ui_usermanagementadmin'))) ? 'style="display:none"' : '' ?> class="has-sub"><a href='#'>Administración</a>
                            <ul>
                                <li <?php echo!(Util::checkAccess(array('action_ui_usermanagementadmin'))) ? 'style="display:none"' : 'visible="visible"' ?>  class="<?php echo is_object(YiiBase::app()->getController()->getModule()) ? (YiiBase::app()->getController()->getModule()->getId() == "cruge" ? "active" : "") : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/users.png") . '  Usuarios y Permisos', Yii::app()->user->ui->userManagementAdminUrl) ?> </li>
                                <li <?php echo!(Util::checkAccess(array('action_ui_usermanagementcreate'))) ? 'style="display:none"' : 'visible="visible"' ?> ></li>
                            </ul>
                        </li>
                    </ul>

                    <ul  class="nav nav-list">
                        <li <?php echo!(Util::checkAccess(array('action_evento_admin', 'action_evento_create','action_tipoEvento_admin','action_tipoEvento_create','action_firma_admin','action_firma_create'))) ? 'style="display:none"' : '' ?> class="has-sub"><a href="#">Eventos Académicos</a>
                            <ul>   
                                <li <?php echo!(Util::checkAccess(array('action_evento_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "evento" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/calendario.png") . ' Administar Eventos', array('/eventos/evento/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_evento_create'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "evento" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Eventos', array('/eventos/evento/create')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_tipoEvento_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "tipoEvento" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/tipo.png") . ' Tipo de Eventos', array('/eventos/tipoEvento/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_tipoEvento_create'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "tipoEvento" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Tipo de Eventos', array('/eventos/tipoEvento/create')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_actividad_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "actividad" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/actividades.png") . ' Administrar Actividades', array('/actividades/actividad/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_actividad_create'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "actividad" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Actividad', array('/actividades/actividad/create')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_firma_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "firma" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/firmas.png") . ' Administrar Firmas', array('/eventos/firma/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_firma_create'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "firma" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Firmas', array('/eventos/firma/create')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_tutor_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "tutor" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/tutor.png") . ' Administrar Tutores', array('/tutores/tutor/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_tutor_create'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "tutor" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Tutor', array('/tutores/tutor/create')) ?></li>
                            </ul>
                        </li>
                    </ul>
                    <ul  class="nav nav-list">
                        <li <?php echo!(Util::checkAccess(array('action_escuela_admin', 'action_escuela_create','action_carrera_admin','action_carrera_create'))) ? 'style="display:none"' : '' ?> class="has-sub"><a href="#">Escuelas</a>
                            <ul>   
                                <li <?php echo!(Util::checkAccess(array('action_escuela_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "escuela" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/escuelas.png") . ' Administar Escuelas', array('/escuelas/escuela/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_escuela_create'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "escuela" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Escuela', array('/escuelas/escuela/create')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_carrera_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "carrera" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/escuelas.png") . ' Administar Carreras', array('/carreras/carrera/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_carrera_create'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "carrera" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Carrera', array('/carreras/carrera/create')) ?></li>
                            </ul>
                        </li>
                    </ul>
                    <ul  class="nav nav-list">
                        <li <?php echo!(Util::checkAccess(array('action_participante_admin','action_inscripcion_adminAprobadosUci', 'action_participante_create','action_inscripcion_admin','action_inscripcion_inscripcion'))) ? 'style="display:none"' : '' ?> class="has-sub"><a href="#">Participantes</a>
                            <ul>   
                                <li <?php echo!(Util::checkAccess(array('action_participante_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "participante" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/participante.png") . ' Administar Participantes', array('/participantes/participante/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_participante_create'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "participante" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Participante', array('/participantes/participante/create')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_inscripcion_admin'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "inscripcion" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/inscripcion.png") . ' Administar Inscripciones', array('/inscripciones/inscripcion/admin')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_inscripcion_adminAprobadosUci'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "inscripcion" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/inscripcion.png") . ' Administar Inscripciones UCI', array('/inscripciones/inscripcion/adminAprobadosUci')) ?></li>
                                <li <?php echo!(Util::checkAccess(array('action_inscripcion_inscripcion'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "inscripcion" ? "active" : "" ?>"><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/vineta.png") . 'Crear Inscripcion', array('/inscripciones/inscripcion/inscripcion')) ?></li>
                            </ul>
                        </li>
                    </ul>
                    <ul  class="nav nav-list">
                        <li <?php echo!(Util::checkAccess(array('action_eventoReporte_index'))) ? 'style="display:none"' : '' ?> class="has-sub"><a href="#">Reportes</a>
                            <ul>   
                                <li <?php echo!(Util::checkAccess(array('action_eventoReporte_index'))) ? 'style="display:none"' : 'visible="visible"' ?> class="<?php echo YiiBase::app()->getController()->getId() == "eventoReporte" ? "active" : "" ?>" ><?php echo CHtml::link(CHtml::image(Yii::app()->baseUrl . "/images/iconos/chart_pie.png") . ' Reporte de Eventos', array('/inscripciones/eventoReporte/index')) ?></li>
                            </ul>
                        </li>
                    </ul>




                </div>



                <div id ="contentMain" class="span9">
                        <div class="row-fluid">
                        <div id="maiMessages" class="flash-messages">
                            <?php
                            $messages = Yii::app()->user->getFlashes();
                            if ($messages) {
                                foreach ($messages as $key => $message) {
                                    echo '<div class="alert alert-' . $key . '">'
                                    . '<button data-dismiss="alert" class="close" type="button">×</button>'
                                    . $message . "</div>\n";
                                }
                            }
                            ?>
                        </div>
                    </div>
                    <?php echo $content; ?>
                </div>
            </div>
        </div>

        <div class="clear"></div>

        <div id="footer">
            <!--FOOTER-->
        </div><!-- footer -->


        <div class="row-fluid">
            <?php
            // El modal de la pÃ¡gina
            $this->beginWidget('bootstrap.widgets.TbModal', array('id' => 'mainModal', 'options' => array('backdrop' => 'static')));
            $this->endWidget();
            ?>
        </div>

    </body>
</html>
